package com.itheima.commen;

import java.util.List;

/**
 * @Description:
 * @Version: V1.0
 */
public class PageResult<T> {
    //总记录数
    private long total;
    //总页数
    private int pages;
    //结果集
    private List<T> list;

    public PageResult() {
    }

    public PageResult(long total, int pages, List<T> list) {
        this.total = total;
        this.pages = pages;
        this.list = list;
    }

    public long getTotal() {
        return total;
    }

    public void setTotal(long total) {
        this.total = total;
    }

    public int getPages() {
        return pages;
    }

    public void setPages(int pages) {
        this.pages = pages;
    }

    public List<T> getResult() {
        return list;
    }

    public void setResult(List<T> list) {
        this.list = list;
    }

    public String toString() {
        return "PageResult{" + "total=" + total + ", pages=" + pages + ", result=" + list + '}';
    }
}
